home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Language/OS - Multiplatform Resource Library
/
LANGUAGE OS.iso
/
ec_plus
/
ec-plus.lha
/
generics
/
WListString_.h
< prev
Wrap
C/C++ Source or Header
|
1989-10-10
|
1KB
|
62 lines
typedef String* String_;
//#include "containers/WList.h"
extern int stepString_;
extern void initializeWListString_(int);
struct WListString_ : WList
{
/* A generic parameterized container
with string-like capabilities, implemented as a
dynamic array of elements of type String_.
Type String_ must fit in a word. */
friend class WList_iteratorString_;
public:
WListString_() : WList() {}
void append(String_ w)
{WList::append((word)w, stepString_);}
void insert(int i, String_ w)
{WList::insert(i, (word)w, stepString_);}
void add(String_ w)
{WList::add((word)w, stepString_);}
int where_is(String_ w)
{return WList::where_is((word)w);}
void remove(int i)
{WList::remove(i, stepString_);}
int length()
{return WList::length();}
String_& operator[](int i)
{return (String_&) WList::operator[](i);}
};
struct WList_iteratorString_ : WList_iterator
{
public:
WList_iteratorString_(WListString_* h, int i) :
WList_iterator(h, i) {}
int first(String_& elem)
{return WList_iterator::first((word&) elem);}
int next(String_& elem)
{return WList_iterator::next((word&) elem);}
int last(String_& elem)
{return WList_iterator::last((word&) elem);}
int prev(String_& elem)
{return WList_iterator::prev((word&) elem);}
int index()
{return WList_iterator::index();}
};